package com.ddwl.goods.mapper;

import com.ddwl.common.dao.mapper.TkMapper;
import com.ddwl.goods.model.DiscountItem;
import com.ddwl.schema.bo.goods.retail.DiscountItemChangeStockBo;
import com.ddwl.schema.bo.goods.retail.DiscountItemPageBo;
import com.ddwl.schema.bo.goods.retail.DiscountItemSaleBo;
import com.ddwl.schema.vo.goods.retail.DiscountItemPageVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2021/3/27 16:31
 */
@Repository
public interface DiscountItemMapper extends TkMapper<DiscountItem> {

    /**
     * 打折商品分页列表
     * @param param
     * @return
     */
    List<DiscountItemPageVo> getDiscountItemList(@Param("param") DiscountItemPageBo param);

    /**
     * 批量修改库存
     * @param boList
     */
    void batchUpdateStock(@Param("discountItemList") List<DiscountItemChangeStockBo> boList);

    /**
     * 批量修改销量信息
     * @param list
     */
    void updateSale(@Param("list") List<DiscountItemSaleBo> list);
}
